<!--公共开窗-->
<div id="window" style="padding: 5px">
    <el-input v-model="keyword" size="mini" @keyup.native.13="queryDatas" placeholder="输入关键字搜索">
        <el-select v-model="prop" slot="prepend" style="width: 100px">
            <el-option v-for="item in config.columnList" v-show="!item.unshow" :label="item.label" :value="item.prop"></el-option>
            <el-option label="全部" value="keyword"></el-option>
        </el-select>
        <el-button slot="append" icon="el-icon-search" @click="queryDatas"></el-button>
    </el-input>
    <el-table :data="tableData" ref="table" border height="355" size="small" style="width: 100%;margin-top: 5px"
              @sort-change="handleSortChange"
              @row-dblclick="doubleClickRow"
              @select="selectRow"
              @select-all="selectAll"
              v-loading="loading"
              element-loading-text="加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(255, 255, 255, 1)">
        <el-table-column v-if="multiple" type="selection" width="55" key="selection"></el-table-column>
        <el-table-column v-if="multiple == false" label="选择" width="70">
            <template slot-scope="scope">
                <el-button
                        type="primary"
                        size="mini"
                        @click="singleClickRow(scope.$index, scope.row)"
                        key="singleClickButton">选择
                </el-button>
            </template>
        </el-table-column>
        <el-table-column v-for="item in config.columnList" :label="item.label" :prop="item.prop" id="item.prop" :min-width="item.width"
                         show-overflow-tooltip sortable="custom" :sort-orders="[]"></el-table-column>
    </el-table>
    <el-row type="flex" justify="space-between">
        <el-col :span="18">
            <el-pagination
                    background
                    @current-change="handleCurrentChange"
                    :current-page.sync="page"
                    :page-size="limit"
                    :pager-count="5"
                    layout="total, prev, pager, next"
                    :total="count">
            </el-pagination>
        </el-col>
        <el-col :span="5">
            <el-select v-model="limit" size="small" @change="handleLimitChange">
                <el-option v-for="item in config.limitList" :label="getLimitLabel(item)" :value="item"></el-option>
            </el-select>
        </el-col>
    </el-row>

    <div style="text-align: right">
        <el-button-group v-show="multiple" style="margin: 10px 0 0 10px;">
            <el-button size="mini" @click="cancel">关闭</el-button>
            <el-button type="warning" size="mini" @click="sure">保存</el-button>
        </el-button-group>
    </div>
    <script>
        require(["pc/common/_open_window"], $.noop);
    </script>
</div>
